package com.payment.config;


import com.alipay.api.AlipayClient;
import com.alipay.api.DefaultAlipayClient;

/* *
 *类名：AlipayConfig
 *功能：基础配置类
 *详细：设置帐户有关信息及返回路径
 *修改日期：2017-04-05
 *说明：
 *以下代码只是为了方便商户测试而提供的样例代码，商户可以根据自己网站的需要，按照技术文档编写,并非一定要使用该代码。
 *该代码仅供学习和研究支付宝接口使用，只是提供一个参考。
 */

public class AlipayConfig {
/**
 3.      * 支付宝网关地址
 4.      */
public static String serverUrl = "https://openapi-sandbox.dl.alipaydev.com/gateway.do";
/**
 7.      * appId
 8.      */
public static String appId = "9021000140655636";
/**
 11.      * 应用私钥 后期替换成自己的私钥
 12.      */
public static String privateKey = "MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC8e97Bl43hobPr6lBaf/yDuRXCBYY1+qFe8paFKXFrra5BbF1hzSxQEUs9Wx7WbL1ej2tqSlyARvWk+2dQt5B+XLwxgwchx0BqlbXyKJIrO9ZwLH5ow1DJLl0IKHxCztIE/fINUnqXMyHY9c/1G10Lftmq1yyPPwfcP8lossJFGpq5hvuRJvPYqYKAXXVrl1ESFAl6kkAkQNq/otgxyLeBEWGsjaXbwAY0vW8X1C3w7YuegvpQw66dj45ze2s+To14o3PJlEhSpa6JXI2PolZjDIHOTqhx1iG68G6SaKkU+6cCD5CEyXH3e1kKgewQwA4KAUXyRHfCIrPlaN2iMRzpAgMBAAECggEBAJIZsmF9iI0NOtnzlrWP37x7C1KJ1a6hx9RBVkuCBFjjF9++j+Pvlhm6TggRSaYMQ/24Thrl6S3F00M/XKZEo8xPNdFrL2wPdu8nfRFoQWUhzObGlnW+cDCBr7tTJn7isgkMj0OkW0I4cFQstjXYMBdpDHBQukmPIhinmQd/CPdmgXQB8NvvgCKOWRHAmxzgQPoX2NoDTsFrw/s+tubSWnrcjF0lgdVGhHEWYRPnaGaYK6nhFxDNo1kSgzRAqPoV5Fv+mfr/Km3WCuqGF7FHfn5U+kFhXpUj7UEp76Qmol629E7B3BJVkntJhMDQtKb2gZNEl69UFfChkUcUo8bYOAECgYEA9DeY8pFxUjtbhhkYKkSf1lSHdQO2ZeXqiENfbBgaeE2xGCWIicZaDYXEO6HRjfi6YcLYWFsR7O6aAcv2+iYn/jvjLh75++0l8nQ35y2bMRhinXpZnk+jwVtPgjkGZtmiFvb8eaJ2d4Zf12TunP4gL16J+OESEOUU2lE9n79G/PECgYEAxZPkqFWUG+txUus2jdiJgtT3zYp4oi6PtBfI70HeS7ZdRHrBOXWMOL722hI6cH0TOQGUNnhzz9cp+kbnOjY7NWf0Ku32l6OpiZr71wvWsDAJzFlNAcu/tWmXKbfZuCqcyvR3lJCjQux9y0pbAGuAyMUTQ8ZkxNqtkXO50kSof3kCgYAVwEHqENQj+89qASAq25PU1hB+docvSiv6WO3NxdPNtTW5rdYcV0M8Axb4LLBqUaXgASedrvbIwHONB2qG2xEizpisSev/6R5BGuLDv0ccN0zJM9V5iSRPm19YfNW6IVYTb4oLF1Iv0RMGLyIlb2jUbzogpYMjaBPUYfn4GWQsMQKBgQCvE1smExc4GkyD9muUC9HmPgMLfm1hATNTmVPzNwHdQ06oNMJtwQys6ALjwA1KynozJIQKNHgjLv1Cinuw6IdUzrXdKJo/SsYbaltI9nOaEidMjcEgG0TYYyWQ0Ro7CH+BlFk2K2iQD/F0J4I2AAzRW1iz0ORQT5pH7i019qL8uQKBgQDaR00LPQ5HRfQuVGyun4c3oeE/i2tMjT8OR7LVVcpGZhAa2tf9fjxOe+p5ZYUcMGStKPCAYi5AWdS+lem1nV6Gg8xnMuOGzbevsuXAgkgJypaSX2+AhOMsoay1WSYvHKmNgf+s0sEvTARh+c3dfo3y8zgCq0guOdUguq+Jis8cEA==";
/**
 15.      * 发送数据的格式 目前只能为json
 16.      */
public static String format = "json";
/**
 19.      * 设置字符集编码 目前只能为utf-8
 20.      */
public static String charset = "utf-8";
/**
 23.      * 支付宝公钥 后期替换成自己的支付宝公钥
 24.      */
public static String publicKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjeZC5qs/jLsNL2fbsvplH6PR8ccN1Ey6QTOsicjbZbXxZnw77Y8zSJjeQO3/WTwSF7FqGiOqCWLN976Cmx1b24H5NKf1SoIqyYiFCW/Vtih6aoGZpWd/oieX+YaFwHnfoN7aicwtInz3LlYLUASSBcVpcyZ/bT11+fXW96nMVrFZcc3TvdEb7m0InF/rzpKMbcwNJ1gf1N0xT8dYJAOyl5Gh/l/OLdt2pSHu0TdnTA3qPufww74Spwi8LsDLJZFgH5q0J3IrOp+9W0bGQAixMNcp0LSAyjqidbNxoEazIJtWjLHcoEEljSXvwuo4tnbXeVL9pNbmkWOQg+iZYUUdXQIDAQAB";
/**
 27.      * 支付宝签名 目前是 RSA2
 28.      */
public static String signType = "RSA2";
public static AlipayClient getAlipayClient() {
        // 获得初始化的AlipayClient
        return new DefaultAlipayClient(AlipayConfig.serverUrl, AlipayConfig.appId,
                                AlipayConfig.privateKey, AlipayConfig.format, AlipayConfig.charset, AlipayConfig.publicKey,
                                AlipayConfig.signType);
             }
}

